<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '报名管理';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="box">
    <div class="box-header with-border">
        <h3 class="box-title"><?= Html::encode($this->title) ?></h3>
    </div>
    <div class="box-body">

    <p>
        <?= Html::a('添加报名', ['添加'], ['class' => 'btn btn-success']) ?>
    </p>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'id',
            'openid',
            'nickname',
            'name',
            'tel',
            'idcard',
            // 'profession',
            [
                'attribute' => 'thumb',
                'format' => 'raw',
                'value' => function($data){
                    return Html::img('http://weixin.lsol.com.cn/tp/backend/web/' . $data->thumb, ['height' => '50']);
                }
            ],
            'created_at',

            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>
</div>
</div>
